//
// Created by 33145 on 2023/4/3.
//

#ifndef SYLAR_PROTOCOL_H
#define SYLAR_PROTOCOL_H
#include <string>
#include <map>
#include <memory>

namespace chat {

  class ChatMessage {
  public:
    typedef std::shared_ptr<ChatMessage> ptr;

    static ChatMessage::ptr Create(const std::string& v);
    ChatMessage();
    std::string get(const std::string& name);
    void set(const std::string& name, const std::string& val);
    std::string toString() const;
    std::string myToString() const;
  private:
    std::map<std::string, std::string> m_datas;
  };

}

#endif //SYLAR_PROTOCOL_H
